-- GENERATED SPELL FOR [Koltira Deathweaver] --


function spell0_29199(pUnit, Event) --@Blood Strike,n/a--
pUnit:FullCastSpellOnTarget(52374,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_29199', 567, 1)
end

function spell1_29199(pUnit, Event) --@Death Grip,n/a--
pUnit:FullCastSpellOnTarget(49576,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_29199', 0, 1)
end

function spell2_29199(pUnit, Event) --@Icy Touch,n/a--
pUnit:FullCastSpellOnTarget(52372,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_29199', 20000, 1)
end

function spell3_29199(pUnit, Event) --@Plague Strike,n/a--
pUnit:FullCastSpellOnTarget(50688,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_29199', 12000, 1)
end

function spell4_29199(pUnit, Event) --@The Light of Dawn,Self--
pUnit:FullCastSpellOnTarget(53658,pUnit)
pUnit:RegisterEvent('Sorts_29199', 580, 1)
end

function Sorts_29199(pUnit, Event)
local choix_sorts_29199 = math.random(0, 4)
if choix_sorts_29199 == 0 then
pUnit:RegisterEvent('spell0_29199', 1, 1)
end
if choix_sorts_29199 == 1 then
pUnit:RegisterEvent('spell1_29199', 1, 1)
end
if choix_sorts_29199 == 2 then
pUnit:RegisterEvent('spell2_29199', 1, 1)
end
if choix_sorts_29199 == 3 then
pUnit:RegisterEvent('spell3_29199', 1, 1)
end
if choix_sorts_29199 == 4 then
pUnit:RegisterEvent('spell4_29199', 1, 1)
end
end

function mob29199_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_29199', math.random(1500, 3000), 1)
end

function mob29199_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob29199_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob29199_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(29199, 1, 'mob29199_Action')
RegisterUnitEvent(29199, 2, 'mob29199_Leave')
RegisterUnitEvent(29199, 3, 'mob29199_Kill')
RegisterUnitEvent(29199, 4, 'mob29199_Die')
